<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?a7c05ce530152d9866930ef4850ee566"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    
    
    
    <title>deepin安装Java开发环境过程 | 神奇的鸭鸭の码农库 | 新知识要不断的总结记录成笔记，要多写，多画，能够清晰透彻的将知识讲给别人听，才是达到理解的层次。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#765959">
    
    
    <meta name="keywords" content="环境搭建">
    <meta name="description" content="首先亮相刚装的系统为了写笔记，先安装了vscode： https://code.visualstudio.com/  安装jdk1、我下载的是jdk-8u40-linux-x64.gz，在操作之前可以让终端登录root账号(不想每次都获得权限)：123// 首次需要初始化root密码sudo passwd root su root 2、进入下载目录：1cd /home/sqdyy/软件 3、解压t">
<meta name="keywords" content="环境搭建">
<meta property="og:type" content="article">
<meta property="og:title" content="deepin安装Java开发环境过程">
<meta property="og:url" content="http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/index.html">
<meta property="og:site_name" content="神奇的鸭鸭の码农库">
<meta property="og:description" content="首先亮相刚装的系统为了写笔记，先安装了vscode： https://code.visualstudio.com/  安装jdk1、我下载的是jdk-8u40-linux-x64.gz，在操作之前可以让终端登录root账号(不想每次都获得权限)：123// 首次需要初始化root密码sudo passwd root su root 2、进入下载目录：1cd /home/sqdyy/软件 3、解压t">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/deepin%E5%88%9D%E5%A7%8B%E5%8C%96.png">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/tomcat%E5%AE%89%E8%A3%851.png">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/tomcat%E5%AE%89%E8%A3%852.png">
<meta property="og:image" content="http://om6odecqr.bkt.clouddn.com/%E5%AE%8C%E6%88%90.png">
<meta property="og:updated_time" content="2017-12-05T06:10:06.198Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="deepin安装Java开发环境过程">
<meta name="twitter:description" content="首先亮相刚装的系统为了写笔记，先安装了vscode： https://code.visualstudio.com/  安装jdk1、我下载的是jdk-8u40-linux-x64.gz，在操作之前可以让终端登录root账号(不想每次都获得权限)：123// 首次需要初始化root密码sudo passwd root su root 2、进入下载目录：1cd /home/sqdyy/软件 3、解压t">
<meta name="twitter:image" content="http://om6odecqr.bkt.clouddn.com/deepin%E5%88%9D%E5%A7%8B%E5%8C%96.png">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.4.3">
    <script>window.lazyScripts=[]</script>
</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">神奇的鸭鸭</h5>
          <a href="mailto:702038338@qq.com" title="702038338@qq.com" class="mail">702038338@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://git.oschina.net/magic_duck" target="_blank" >
                <i class="icon icon-lg icon-gg-circle"></i>
                码云
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.zhihu.com/people/shen-qi-de-ya-ya" target="_blank" >
                <i class="icon icon-lg icon-twitter"></i>
                知乎
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/404.html"  >
                <i class="icon icon-lg icon-link"></i>
                404页面测试
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">deepin安装Java开发环境过程</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">deepin安装Java开发环境过程</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-08-16T16:00:00.000Z" itemprop="datePublished" class="page-time">
  2017-08-17
</time>


            
        </h5>
    </div>

    

</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#首先亮相刚装的系统"><span class="post-toc-number">1.</span> <span class="post-toc-text">首先亮相刚装的系统</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装jdk"><span class="post-toc-number">2.</span> <span class="post-toc-text">安装jdk</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装eclipse"><span class="post-toc-number">3.</span> <span class="post-toc-text">安装eclipse</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装mysql"><span class="post-toc-number">4.</span> <span class="post-toc-text">安装mysql</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装maven"><span class="post-toc-number">5.</span> <span class="post-toc-text">安装maven</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装Shadowsocks-qt5"><span class="post-toc-number">6.</span> <span class="post-toc-text">安装Shadowsocks-qt5</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装node-js"><span class="post-toc-number">7.</span> <span class="post-toc-text">安装node.js</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装git"><span class="post-toc-number">8.</span> <span class="post-toc-text">安装git</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#安装hexo"><span class="post-toc-number">9.</span> <span class="post-toc-text">安装hexo</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#配置tomcat"><span class="post-toc-number">10.</span> <span class="post-toc-text">配置tomcat</span></a></li></ol>
        </nav>
    </aside>
    
<article id="post-Deepin_Install_JavaEnvironment"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">deepin安装Java开发环境过程</h1>
        <div class="post-meta">
            <time class="post-time" title="2017年08月17日 0:00" datetime="2017-08-16T16:00:00.000Z"  itemprop="datePublished">2017-08-17</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="首先亮相刚装的系统"><a href="#首先亮相刚装的系统" class="headerlink" title="首先亮相刚装的系统"></a>首先亮相刚装的系统</h2><p>为了写笔记，先安装了vscode：</p>
<p><a href="https://code.visualstudio.com/" target="_blank" rel="external">https://code.visualstudio.com/</a></p>
<p><img src="http://om6odecqr.bkt.clouddn.com/deepin%E5%88%9D%E5%A7%8B%E5%8C%96.png" alt="deepin初始化"></p>
<h2 id="安装jdk"><a href="#安装jdk" class="headerlink" title="安装jdk"></a>安装jdk</h2><p>1、我下载的是jdk-8u40-linux-x64.gz，在操作之前可以让终端登录root账号(不想每次都获得权限)：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">// 首次需要初始化root密码</div><div class="line">sudo passwd root </div><div class="line">su root</div></pre></td></tr></table></figure></p>
<p>2、进入下载目录：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">cd /home/sqdyy/软件</div></pre></td></tr></table></figure></p>
<p>3、解压tar.gz包：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo tar -zxvf jdk-8u40-linux-x64.gz</div></pre></td></tr></table></figure></p>
<p>4、安装jdk：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">sudo mkdir /usr/lib/jvm</div><div class="line">sudo mkdir /usr/lib/jvm/java</div><div class="line">sudo mv jdk1.8.0_40/ /usr/lib/jvm/java/</div></pre></td></tr></table></figure></p>
<p>5、编辑JDK环境变量配置：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo gedit /etc/profile</div></pre></td></tr></table></figure></p>
<p>6、在配置文件末尾追加：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"># jdk1.8.0</div><div class="line">export JAVA_HOME=/usr/lib/jvm/java/jdk1.8.0_40</div><div class="line">export CLASSPATH=/usr/lib/jvm/java/jdk1.8.0_40/lib</div><div class="line">export PATH=$PATH:$JAVA_HOME/bin:$CLASSPATH</div></pre></td></tr></table></figure></p>
<p>7、使配置生效：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">source /etc/profile</div></pre></td></tr></table></figure></p>
<p>8、配置默认JDK(update-alternatives是ubuntu系统中专门维护系统命令链接符的工具，后面的1171是用来指定当前链接的优先级，最高的优先级将自动被设置为默认版本)：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">sudo update-alternatives --install /usr/bin/javac javac  /usr/lib/jvm/java/jdk1.8.0_40/bin/javac  1171</div><div class="line">sudo update-alternatives --install /usr/bin/java  java  /usr/lib/jvm/java/jdk1.8.0_40/bin/java  1171</div><div class="line">sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/java/jdk1.8.0_40/bin/jar 1171   </div><div class="line">sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java/jdk1.8.0_40/bin/javah 1171   </div><div class="line">sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java/jdk1.8.0_40/bin/javap 1171</div></pre></td></tr></table></figure></p>
<p>9、测试版本：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">java -version</div><div class="line"></div><div class="line">Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp</div><div class="line">java version &quot;1.8.0_40&quot;</div><div class="line">Java(TM) SE Runtime Environment (build 1.8.0_40-b25)</div><div class="line">Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)</div></pre></td></tr></table></figure></p>
<h2 id="安装eclipse"><a href="#安装eclipse" class="headerlink" title="安装eclipse"></a>安装eclipse</h2><p>1、我下载的是eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz，将其解压：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo tar -zxvf eclipse-jee-oxygen-R-linux-gtk-x86_64.tar.gz</div></pre></td></tr></table></figure></p>
<p>2、安装eclipse<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo mkdir /usr/lib/ide/</div><div class="line">sudo mv eclipse/ /usr/lib/ide/</div></pre></td></tr></table></figure></p>
<p>3、创建快捷方式<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo gedit /usr/share/applications/eclipse.desktop</div></pre></td></tr></table></figure></p>
<p>4、eclipse.desktop如下配置：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">[Desktop Entry]  </div><div class="line">Type=Application  </div><div class="line">Name=Eclipse  </div><div class="line">Comment=Eclipse Integrated Development Environment  </div><div class="line">Icon=/usr/lib/ide/eclipse/icon.xpm  </div><div class="line">Exec=/usr/lib/ide/eclipse/eclipse  </div><div class="line">Terminal=false  </div><div class="line">Categories=Development;IDE;Java;</div></pre></td></tr></table></figure></p>
<h2 id="安装mysql"><a href="#安装mysql" class="headerlink" title="安装mysql"></a>安装mysql</h2><p>1、直接使用apt-get安装<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install mysql-server mysql-client</div></pre></td></tr></table></figure></p>
<p>2、安装途中会有两次需要输入密码，就是mysql的root账户密码，然后一路按Y安装成功。</p>
<p>3、查看mysql配置文件(该配置文件指出数据文件存放路径 datadir = /var/lib/mysql)<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">cat /etc/mysql/my.cnf</div></pre></td></tr></table></figure></p>
<p>4、进入mysql<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">mysql -u root -p</div></pre></td></tr></table></figure></p>
<h2 id="安装maven"><a href="#安装maven" class="headerlink" title="安装maven"></a>安装maven</h2><p>1、下载apache-maven-3.5.0-bin.tar.gz，解压maven<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">cd /home/sqdyy/软件</div><div class="line">sudo tar -zxvf apache-maven-3.5.0-bin.tar.gz</div></pre></td></tr></table></figure></p>
<p>2、安装maven<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo mv apache-maven-3.5.0/ /usr/lib/ide/</div></pre></td></tr></table></figure></p>
<p>3、编辑环境变量<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo gedit /etc/profile</div></pre></td></tr></table></figure></p>
<p>4、添加环境变量<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"># maven3.5.0</div><div class="line">export MAVEN_HOME=/usr/lib/ide/apache-maven-3.5.0</div><div class="line">export MAVEN_OPTS=&quot;-Xms256m -Xmx512m&quot;</div><div class="line">export PATH=$&#123;MAVEN_HOME&#125;/bin:$PATH</div></pre></td></tr></table></figure></p>
<p>5、检查版本<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">root@sqdyy-X555LI:~# mvn -version</div><div class="line">Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T03:39:06+08:00)</div><div class="line">Maven home: /root/IDE/maven-3.5</div><div class="line">Java version: 1.8.0_40, vendor: Oracle Corporation</div><div class="line">Java home: /usr/lib/jvm/jdk1.8.0_40/jre</div><div class="line">Default locale: zh_CN, platform encoding: UTF-8</div><div class="line">OS name: &quot;linux&quot;, version: &quot;4.10.0-30-generic&quot;, arch: &quot;amd64&quot;, family: &quot;unix&quot;</div></pre></td></tr></table></figure></p>
<p>6、拷贝全局配置文件到用户配置文件目录下<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo mvn // 运行一次maven生成用户配置文件目录</div><div class="line">cp /usr/lib/ide/apache-maven-3.5.0/conf/settings.xml /home/sqdyy/.m2/</div></pre></td></tr></table></figure></p>
<p>7、修改maven的用户配置文件：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo gedit /home/sqdyy/.m2/settings.xml</div></pre></td></tr></table></figure></p>
<p>8、修改以下内容：<br><figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line"><span class="comment">&lt;!-- 将默认的地址改为指定的本地仓库地址 --&gt;</span></div><div class="line"><span class="tag">&lt;<span class="name">localRepository</span>&gt;</span>/home/sqdyy/MavenRepository<span class="tag">&lt;/<span class="name">localRepository</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">mirrors</span>&gt;</span></div><div class="line">    <span class="comment">&lt;!-- 把Maven中央仓库换成阿里云 --&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">mirror</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>alimaven<span class="tag">&lt;/<span class="name">id</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>central<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span>        </div><div class="line">        <span class="tag">&lt;<span class="name">name</span>&gt;</span>aliyun maven<span class="tag">&lt;/<span class="name">name</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">url</span>&gt;</span></div><div class="line">            http://maven.aliyun.com/nexus/content/groups/public/</div><div class="line">        <span class="tag">&lt;/<span class="name">url</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">mirrors</span>&gt;</span></div></pre></td></tr></table></figure></p>
<p>9、创建一个基本的测试工程<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">helloMaven工程</div><div class="line">    |-- src (源码包)</div><div class="line">        |-- main (正常的源码包)</div><div class="line">            |-- java (.java文件的目录)</div><div class="line">            |-- resources (资源文件的目录)</div><div class="line">        |-- test (测试的源码包)</div><div class="line">            |-- java (.java文件的目录)</div><div class="line">            |-- resources (资源文件的目录)</div><div class="line">    |-- target (class文件、报告等信息存储的地方)</div><div class="line">    |-- pom.xml (maven工程的描述文件)</div></pre></td></tr></table></figure></p>
<p>10、具体测试方法请参照我的另一篇博客<a href="http://magic_duck.oschina.io/2017/08/08/Maven%E5%BF%AB%E9%80%9F%E5%85%A5%E9%97%A8/">maven快速入门</a></p>
<p>11、在pom.xml所在的目录下执行 mvn compile，查看自定义仓库是否生成目录结构</p>
<h2 id="安装Shadowsocks-qt5"><a href="#安装Shadowsocks-qt5" class="headerlink" title="安装Shadowsocks-qt5"></a>安装Shadowsocks-qt5</h2><p>Deepin应用中心已上架Shadowsocks QT5，可以直接安装了：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt install shadowsocks-qt5</div></pre></td></tr></table></figure></p>
<p>系统配置：将Shadowsocks节点配置好点击测试延时，延时正常基本上可以确定节点配置没问题可以进行连接了，然后到系统设置-网络-代理-手动-Socks代理设置地址为127.0.0.1，端口号为1080即可使用。注意用完后关闭Shadowsocks QT5要将代理设置为无，否则会出现网络无法连接。</p>
<h2 id="安装node-js"><a href="#安装node-js" class="headerlink" title="安装node.js"></a>安装node.js</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install nodejs</div><div class="line">sudo apt-get install npm</div></pre></td></tr></table></figure>
<h2 id="安装git"><a href="#安装git" class="headerlink" title="安装git"></a>安装git</h2><p>安装git<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo apt-get install git</div></pre></td></tr></table></figure></p>
<h2 id="安装hexo"><a href="#安装hexo" class="headerlink" title="安装hexo"></a>安装hexo</h2><p>1、hexo常用命令：<a href="https://hexo.io/zh-cn/docs/commands.html" target="_blank" rel="external">https://hexo.io/zh-cn/docs/commands.html</a></p>
<p>2、安装前建议切换npm为淘宝镜像<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo npm config set registry http://registry.cnpmjs.org</div></pre></td></tr></table></figure></p>
<p>3、安装hexo<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">sudo npm install -g hexo-cli</div></pre></td></tr></table></figure></p>
<p>4、遇到了一点小问题，解决方案：<a href="https://github.com/hexojs/hexo/issues/2695：" target="_blank" rel="external">https://github.com/hexojs/hexo/issues/2695：</a><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line">npm ERR! code ELIFECYCLE</div><div class="line">npm ERR! errno 243</div><div class="line">npm ERR! hexo-util@0.6.1 postinstall: `npm run build:highlight`</div><div class="line">npm ERR! Exit status 243</div><div class="line">npm ERR! </div><div class="line">npm ERR! Failed at the hexo-util@0.6.1 postinstall script &apos;npm run build:highlight&apos;.</div><div class="line">npm ERR! Make sure you have the latest version of node.js and npm installed.</div><div class="line">npm ERR! If you do, this is most likely a problem with the hexo-util package,</div><div class="line">npm ERR! not with npm itself.</div><div class="line">npm ERR! Tell the author that this fails on your system:</div><div class="line">npm ERR!     npm run build:highlight</div><div class="line">npm ERR! You can get information on how to open an issue for this project with:</div><div class="line">npm ERR!     npm bugs hexo-util</div><div class="line">npm ERR! Or if that isn&apos;t available, you can get their info via:</div><div class="line">npm ERR!     npm owner ls hexo-util</div><div class="line">npm ERR! There is likely additional logging output above.</div><div class="line"></div><div class="line">npm ERR! A complete log of this run can be found in:</div><div class="line">npm ERR!     /root/.npm/_logs/2017-08-16T19_22_09_493Z-debug.log</div></pre></td></tr></table></figure></p>
<p>5、检查Hexo版本，赠送<a href="http://z77z.oschina.io/2017/01/14/免费个人博客搭建教程（详细-图文）--Hexo+OSChina/" target="_blank" rel="external">如何搭建hexo博客</a>：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo</div></pre></td></tr></table></figure></p>
<h2 id="配置tomcat"><a href="#配置tomcat" class="headerlink" title="配置tomcat"></a>配置tomcat</h2><p>1、我下载的是apache-tomcat-7.0.47.tar.gz，解压到任意目录即可，然后启动eclipse，进行配置：</p>
<p><img src="http://om6odecqr.bkt.clouddn.com/tomcat%E5%AE%89%E8%A3%851.png" alt="2"></p>
<p><img src="http://om6odecqr.bkt.clouddn.com/tomcat%E5%AE%89%E8%A3%852.png" alt="3"></p>
<p>完成撒花：<br><img src="http://om6odecqr.bkt.clouddn.com/%E5%AE%8C%E6%88%90.png" alt="4"></p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2017-12-05T06:10:06.198Z" itemprop="dateUpdated">2017年12月5日 14:10</time>
</span><br>


        如要转载请注明出处：<a href="/2017/08/17/Deepin_Install_JavaEnvironment/" target="_blank" rel="external">http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/</a>
    </div>
    <footer>
        <a href="http://magic_duck.oschina.io">
            <img src="/img/avatar.jpg" alt="神奇的鸭鸭">
            神奇的鸭鸭
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/环境搭建/">环境搭建</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&title=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&title=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/08/21/JavaWeb存储数据到数据库乱码问题/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">JavaWeb存储数据到数据库乱码问题</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/08/15/Mybatis_primary_08/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Mybatis快速入门八(整合spring)</h4>
      </a>
    </div>
  
</nav>



    







</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        我只要一角钱~ ~
        <i class="icon icon-quote-right"></i>
    </h3>
    <ul class="reward-items">
        
        <li>
            <img src="/img/wechat.png" title="微信打赏二维码" alt="微信打赏二维码">
            <p>微信</p>
        </li>
        

        
        <li>
            <img src="/img/alipay.jpg" title="支付宝打赏二维码" alt="支付宝打赏二维码">
            <p>支付宝</p>
        </li>
        
    </ul>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            <span><a href="" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            <span>博客内容遵循 <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p>
            <span>Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://git.oschina.net/z77z" target="_blank">邹海清</a></span>
            <span>神奇的鸭鸭の码农库 &copy; 2017</span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&title=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&pic=http://magic_duck.oschina.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&title=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《deepin安装Java开发环境过程》 — 神奇的鸭鸭の码农库&url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/&via=http://magic_duck.oschina.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://magic_duck.oschina.io/2017/08/17/Deepin_Install_JavaEnvironment/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };



lazyScripts.push('//s95.cnzz.com/z_stat.php?id=1261081671&web_id=1261081671')

</script>

<script src="/js/main.min.js?v=1.4.3"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.4.3" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>


</body>
</html>
